package laspon.vvvlike.school.dto;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @author xqcw9
 */
public class BaseResponse implements Serializable {
    private static final long serialVersionUID = 2809767088465227332L;

    @ApiModelProperty(name = "响应代码", example = "0000")
    private String rtnCode;
    @ApiModelProperty(name = "响应信息", example = "成功")
    private String rtnMsg;
    @ApiModelProperty(name = "标志字段", example = "0-删除 1-保存 2-更新")
    private String flag;

    public void success() {
        this.rtnCode = "0000";
        this.rtnMsg = "请求成功";
    }

    public void fail() {
        this.rtnCode = "9999";
        this.rtnMsg = "请求失败";
    }

    public String getRtnCode() {
        return rtnCode;
    }

    public void setRtnCode(String rtnCode) {
        this.rtnCode = rtnCode;
    }

    public String getRtnMsg() {
        return rtnMsg;
    }

    public void setRtnMsg(String rtnMsg) {
        this.rtnMsg = rtnMsg;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }
}
